import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import SingerDetails from '../components/detailsList/SingerDetails.vue'
import RecommendedRadioStationsList from "../components/songlist/RecommendedRadioStationsList.vue"
import ShowList from '../components/ShowList/ShowList.vue'
import SongList from '../components/songlist/SongList.vue'
import SingerHome from '../components/singer/SingerHome.vue'
import MVList from '../components/mvlist/MVList.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  },
  {
    path: '/detailsList/:id',
    name: 'Singer',
    component: SingerDetails
  }, {
    path: '/dj/program/detail/:id',
    name: 'RecommendedRadioStationsList',
    component: RecommendedRadioStationsList
  },
  {
    path: '/ShowList/:id',
    name: 'ShowList',
    component: ShowList
  },
  {
    path: '/songlist/:id',//带参动态路由
    name: 'songlist',
    component: SongList
  },
  {
    path: '/singer/:id',
    name: 'singer',
    component: SingerHome
  },
  {
    path: '/mvlist/:id',//带参动态路由
    name: 'mvlist',
    component: MVList
  }
  // {
  //   path: '/rank',
  //   name: 'rank',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: RankView
  // }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router